package com.tdkj.model.enterprisezone;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;
/**
 * KyFriendlylink entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ezone_friendslink")
public class BeanEnterpriseZoneFriendsLink extends BaseEntity{

	private BeanUser friend ; 
	private String url ;
	private BeanEnterpriseZone enterpriseZone;
	

	@OneToOne(fetch = FetchType.EAGER , cascade = CascadeType.REFRESH)
	public BeanUser getFriend() {
		return friend;
	}
	public void setFriend(BeanUser friend) {
		this.friend = friend;
	}
	
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	
	@ManyToOne(fetch = FetchType.EAGER , cascade = {CascadeType.REFRESH })
	@JoinColumn(name = "enterpriseZone_id", nullable = false)
	public BeanEnterpriseZone getEnterpriseZone() {
		return enterpriseZone;
	}
	
	public void setEnterpriseZone(BeanEnterpriseZone enterpriseZone) {
		this.enterpriseZone = enterpriseZone;
	}
	
}